package com.cxhc.system.service.app.impl;

import java.util.List;

import com.cxhc.system.domain.app.EventApprovalFile;
import com.cxhc.system.mapper.app.EventApprovalFileMapper;
import com.cxhc.system.service.app.IEventApprovalFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 事项报备审批文件附件Service业务层处理
 * 
 * @author Dhq
 * @date 2024-08-06
 */
@Service
public class EventApprovalFileServiceImpl implements IEventApprovalFileService
{
    @Autowired
    private EventApprovalFileMapper eventApprovalFileMapper;

    /**
     * 查询事项报备审批文件附件
     * 
     * @param eventId 事项报备审批文件附件主键
     * @return 事项报备审批文件附件
     */
    @Override
    public EventApprovalFile selectEventApprovalFileByEventId(Long eventId)
    {
        return eventApprovalFileMapper.selectEventApprovalFileByEventId(eventId);
    }

    /**
     * 查询事项报备审批文件附件列表
     * 
     * @param eventApprovalFile 事项报备审批文件附件
     * @return 事项报备审批文件附件
     */
    @Override
    public List<EventApprovalFile> selectEventApprovalFileList(EventApprovalFile eventApprovalFile)
    {
        return eventApprovalFileMapper.selectEventApprovalFileList(eventApprovalFile);
    }

    @Override
    public List<EventApprovalFile> selectEventApprovalFileListByEventApprovalId(Long eventApprovalId){
        return eventApprovalFileMapper.selectEventApprovalFileList(new EventApprovalFile().setEventId(eventApprovalId));
    }

    /**
     * 新增事项报备审批文件附件
     * 
     * @param eventApprovalFile 事项报备审批文件附件
     * @return 结果
     */
    @Override
    public int insertEventApprovalFile(EventApprovalFile eventApprovalFile)
    {
        return eventApprovalFileMapper.insertEventApprovalFile(eventApprovalFile);
    }

    /**
     * 修改事项报备审批文件附件
     * 
     * @param eventApprovalFile 事项报备审批文件附件
     * @return 结果
     */
    @Override
    public int updateEventApprovalFile(EventApprovalFile eventApprovalFile)
    {
        return eventApprovalFileMapper.updateEventApprovalFile(eventApprovalFile);
    }

    /**
     * 批量删除事项报备审批文件附件
     * 
     * @param eventIds 需要删除的事项报备审批文件附件主键
     * @return 结果
     */
    @Override
    public int deleteEventApprovalFileByEventIds(Long[] eventIds)
    {
        return eventApprovalFileMapper.deleteEventApprovalFileByEventIds(eventIds);
    }

    /**
     * 删除事项报备审批文件附件信息
     * 
     * @param eventId 事项报备审批文件附件主键
     * @return 结果
     */
    @Override
    public int deleteEventApprovalFileByEventId(Long eventId)
    {
        return eventApprovalFileMapper.deleteEventApprovalFileByEventId(eventId);
    }
}
